package action_行为型.command_pattern_命令模式;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/07/20:23
 * @Description:
 */
public class Broker {

	public List<Order> orders = new ArrayList<>();

	public void takeOrder(Order order) {
		orders.add(order);
	}

	public void placeOrders() {
		orders.forEach(Order::execute);
	}
}
